//////////////////////////////////////////////////////
// SimpleMDIChild.h
//  Declaration of the CSimpleView and CSimpleMDIChild class

#ifndef MDICHILDVIEW_H
#define MDICHILDVIEW_H


// User defined window message sent when the Simple MDI Child is created
// WPARAM is a pointer to the view window. 
#define UWM_SIMPLECREATED       (WM_APP + 0x0001)

// Declaration of CSimpleView
class CSimpleView : public CWnd
{
public:
    CSimpleView();
    virtual void OnDraw(CDC& dc);
    virtual LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam);
    virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);
    
    COLORREF GetColor() {return m_Color;}
    void SetColor(COLORREF color) { m_Color = color; }

private:
    COLORREF m_Color;
};


// Declaration of CSimpleMDIChild
class CSimpleMDIChild : public CMDIChild
{
public:
    CSimpleMDIChild();
    virtual ~CSimpleMDIChild();

protected:
    virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
    virtual int OnCreate(CREATESTRUCT& cs);
    virtual LRESULT WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam);

private:
    CSimpleView m_View;
    CMenu m_Menu;
};

#endif  //MDICHILDVIEW_H
